//
//  NSString+Extension.h
//  GTMC_CarOwner_Yonyou
//
//  Created by hongw on 16/4/18.
//  Copyright © 2016年 zgq. All rights reserved.
//

#import <UIKit/UIKit.h>


@interface NSString (Extension)

//时间转换，从一种格式的时间转成另外一种
- (NSString *)dateStringFromFormat:(NSString *)fromFormat toFormat:(NSString *)toFormat;
- (CGSize)getSizeWithFontSize:(UIFont *)fontSize maxWidth:(CGFloat)maxWidth;
- (CGSize)getSizeWithFontSize:(UIFont *)fontSize maxHeight:(CGFloat)maxHeight;

+(BOOL)isContainsEmoji:(NSString *)string;
+ (NSString *)disable_emoji:(NSString *)text;       // 自动将表情转为空字符
+ (BOOL)isEmpty:(NSString *)str;        // 是否空字符串
+ (NSString *)vaildStringIsEmpty:(NSString *)str withReplaceStr:(NSString *)repStr;        // 如果是空则使用替换String

// 字符串的长度，汉字2个字节
+ (NSInteger)chartLengthByString:(NSString*)str;

// 中划线
+ (NSAttributedString *)underStrikeLineAttributedWithString:(NSString *)str;

- (BOOL) containsString: (NSString*) substring;

//uicode字符编码
+ (NSString*)changeUinicodeStringToNSString:(NSString*)unicodeStr;

@end
